<template>
	<BaseContainer>
		<el-tabs tab-position="left" v-model="activeName">
			<el-tab-pane v-for="(item, index) in tabsList" :key="index" :label="item.label" :name="item.value"></el-tab-pane>
			<familyBedConstruct
				v-if="activeName == 4"
				:tableConfig="tableFamilyConfig"
				:isComprehensiveQueries="false"
				:moreSearchConfig="''"
			></familyBedConstruct>
			<aplid-base-crud
				v-else
				:key="activeName"
				ref="crud"
				class="w-100"
				v-bind="activeItem.baseConfig"
				:paramsObj="{ ...(activeItem.paramsObj || {}), ...(activeItem.baseConfig.paramsObj || {}) }"
			>
				<template v-slot:pageName></template>
			</aplid-base-crud>
		</el-tabs>
	</BaseContainer>
</template>

<script setup>
import { baseConfig as PolicyDocuments } from '../common/dpWorkPlan'
import { baseConfig as BottoOut } from '../elderlyReform/BottoOut'
import { baseConfig as TargetValue } from '../elderlyReform/TargetValue'
import familyBedConstruct from '@/views/datacenter/business/familyBedConstruct/index.vue'
import { tableFamilyConfig } from '../common/config'

const activeName = ref(4)
const tabsList = [
	// {
	// 	label: '政策文件/工作方案',
	// 	value: 1,
	// 	baseConfig: PolicyDocuments,
	// 	paramsObj: {
	// 		type: 0,
	// 		typeLabel: '2024年实施适老化改造工作方案（区）',
	// 	},
	// },
	// {
	// 	label: '摸底名单',
	// 	value: 3,
	// 	baseConfig: BottoOut,
	// 	paramsObj: {
	// 		bottomingNeeds: 1,
	// 		bottomingNeedsLabel: '家庭养老床位',
	// 	},
	// },
	{ label: '家庭养老床位建设档案', value: 4 },
	// {
	// 	label: '目标值',
	// 	value: 5,
	// 	baseConfig: TargetValue,
	// 	paramsObj: {
	// 		contentType: '2',
	// 		contentTypeLabel: '家庭养老床位照护床位目标值',
	// 	},
	// },
]

const activeItem = computed(() => {
	return tabsList.find((item) => item.value === activeName.value) || {}
})
</script>

<style lang="scss" scoped></style>
